<!doctype html>
<html lang="en-us">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, height=device-height, user-scalable=0"/>
    <link rel="icon" href="common/favicon.ico" type="image/x-icon">
    <title>MiniLive</title>
    <style>
        body {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            margin: 0;
            background-color: #f0f0f0;
            overflow: hidden; /* 防止滚动条出现 */
        }

        video, canvas {
            border: 2px solid #ccc;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

#canvas_video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

        #canvas_gl {
            position: absolute;
            top: -9999px;
            left: -9999px;
            width: 128px;
            height: 128px;
        }


      #screen {
        position: absolute;
        bottom: -1000;
        right: -1000;
        width: 1px;
        height: 1px;
      }

      #screen2 {
            width: 100%;
            height: 100%;
            position: absolute; /* Position the iframe absolutely */
            top: 0;
            left: 0;
            border: none;
            z-index: 5; /* Ensure iframe is above other elements */
        }
        /* 居中显示“请点击开始” */
        #startMessage {
            position: absolute;
            top: 60%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 24px;
            font-weight: bold;
            color: #333;
            z-index: -2;
        }
        #canvasEl {
            position: absolute;
            left: -9999px;  /* 移出可视区域 */
            top: -9999px;
            /* 保持canvas正常尺寸 */
            width: 300px;
            height: 150px;
        }
    </style>

  </head>
  <body>
    <figure style="overflow:visible;" id="loadingSpinner">
        <strong>MiniMates: loading...</strong>
    </figure>
    <canvas id="canvasEl"></canvas>
    <!-- Visible canvas elements -->
    <canvas id="canvas_video"></canvas>

    <canvas id="canvas_gl" width="128" height="128"></canvas>

    <div id="screen"></div>
    <iframe id="screen2" src="dialog.html" frameborder="0" style="display: none;"></iframe>
    <!-- 添加“请点击开始”的元素 -->
    <div id="startMessage">加载中</div>
    <script src="js/pako.min.js"></script>
    <script src="js/mp4box.all.min.js"></script>
    <script src="js/DHLiveMini.js"></script>
    <script src="js/MiniMateLoader.js"></script>
    <script src="js/MiniLive2.js"></script>
  </body>
</html>
